package com.tan.androidtest.util;

import android.content.Context;
import android.text.TextUtils;
import android.widget.Toast;

/**
 * Created by Administrator on 2017/12/4.
 */

public class ToastUtil {

    /**
     *
     * @param context not null
     * @param message not null
     */
    public static void showToast(Context context, String message) {
        if (context == null || TextUtils.isEmpty(message)) {
            throw new RuntimeException("context or message are null!");
        }
        Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
    }

}
